#include "Blocks/MotionDetectorBlock.h"

namespace PocketSurvival
{
    int32_t MotionDetectorBlock::getIndex()
    {
        return Index();
    }
    const std::string &MotionDetectorBlock::getBlockName()
    {
        static std::string blockName = "MotionDetectorBlock";
        return blockName;
    }

    const std::vector<BoundingBox> &MotionDetectorBlock::getCustomCollisionBoxes(int32_t value)
    {
        int32_t num = Terrain::ExtractData(value);
        if(num < GET_ARRAY_LEN(BlockConstans::motionDetectorCollisionBoxes))
        {
            return BlockConstans::motionDetectorCollisionBoxes[num];
        }
        return BlockConstans::zeroCollisionBoxes;
    }
}